home *** CD-ROM | disk | FTP | other *** search
- Path: info.spt.net.cn!usenet
- From: txwang@public.sta.net.cn (Wang TianXing)
- Newsgroups: comp.lang.c++
- Subject: Re: who know how to use large array in c++?
- Date: Wed, 24 Jan 1996 18:00:03 GMT
- Organization: No Organization
- Distribution: world
- Message-ID: <4e5r4v$41f@info.sta.net.cn>
- References: <4e2555$ro6@flood.weeg.uiowa.edu> <4e0ml0$jt5@mercury.wright.edu> <4e2g23$caf@vixen.cso.uiuc.edu>
- NNTP-Posting-Host: ts2-10.sta.net.cn
- X-Newsreader: Forte Free Agent 1.0.82
-
- sjmccaug@prairienet.org (Scott J. McCaughrin) wrote:
-
- | In <4e0ml0$jt5@mercury.wright.edu>, Apichart Intarapanich <aintara> writes:
- | >hi
- | >anybody know how can i declare array like this
- | >
- | >float a[1000][1000][1000];
- | >
- | >i cannot do that. i got segmentation fault statement. who know what should i
- | >do?
- | >apichart
-
- | Apichart,
-
- | How much memory do you have on your machine? Have you considered 2 vectors,
- | each with 1,000 pointers, to a third vector of floats? The first vector can
- | be considered an array of pointers to vectors of pointers, each pointer in
- | the vector to a vector of 1,000 floats.
-
- | -- Scott McC.
-
- Apichart,
-
- If your CPU has only 32 or less address lines, you cannot do that,
- even with Scott's method.
-
- If your CPU has plenty of, say, 48, address lines and your OS supports
- them, you can try to config your OS to allow your proccess to have 4GB
- or more of memory. If this doesn't work, buy a more expensive system
- which can fulfil your needs. :(
-
- ---
- Wang TianXing
-
-
-